{% for page_number in page_obj.paginator.page_range %}
    <a href="{% url 'terms-by-page' page_number %}" class="{% if page_number == page_obj.number %}current{% endif %}">
        {{page_number}}
    </a>
{% endfor %}
